﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using WinSCP;
using EFFC.Net.Returns;

namespace EFFC.Net.ResourceLib.Returns
{
    [Serializable]
    public class SFTPRtn:ReturnStd
    {
        public SFTPRtn()
        {
            AddReElement("IsSuccess", typeof(bool));
            AddReElement("ErrorMessage");
            AddReElement("ListFiles",typeof(List<string>));
            AddReElement("ListDirectories", typeof(List<string>));

            SetValue("IsSuccess", false);
        }
        /// <summary>
        /// 执行是否成功
        /// </summary>
        public bool IsSuccess
        {
            get { return GetValue<bool>("IsSuccess"); }
            set { SetValue("IsSuccess", value); }
        }
        /// <summary>
        /// 失败的信息
        /// </summary>
        public string ErrorMessage
        {
            get { return GetValue<string>("ErrorMessage"); }
            set { SetValue("ErrorMessage", value); }
        }
        /// <summary>
        /// 返回的远端目录下的所有文件
        /// </summary>
        public List<string> ListFiles
        {
            get { return GetValue<List<string>>("ListFiles"); }
            set { SetValue("ListFiles", value); }
        }
        /// <summary>
        /// 返回的远端目录下的所有子目录，不含嵌套目录
        /// </summary>
        public List<string> ListDirectories
        {
            get { return GetValue<List<string>>("ListDirectories"); }
            set { SetValue("ListDirectories", value); }
        }
    }
}
